package com.changli07._interface.exer3;

public class Car extends Vehicle implements IPower {
    private String carNumber;

    public Car() {
    }

    public Car(String carNumber) {
        this.carNumber = carNumber;
    }

    public Car(String brand, String color, String carNumber) {
        super(brand, color);
        this.carNumber = carNumber;
    }

    public String getCarNumber() {
        return carNumber;
    }

    public void setCarNumber(String carNumber) {
        this.carNumber = carNumber;
    }
    public void run(){
//        System.out.println(this.getBrand());
//        System.out.println(this.getColor());
//        System.out.println(this.getCarNumber());
        System.out.println("汽车通过内燃机驱动行驶");
    }
    @Override
    public void power(){
        System.out.println("加油");
    }
}
